package com.itheima.health.controller;

import com.itheima.health.dto.SetmealDTO;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.entity.Result;
import com.itheima.health.service.SetmealService;
import com.itheima.health.utils.aliyunoss.AliyunUtils;
import com.itheima.health.utils.redis.RedisUtil;
import com.itheima.health.utils.resources.RedisConstant;
import com.itheima.health.utils.resources.UploadUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.concurrent.TimeUnit;

@RestController
@Api(tags = "移动端预约开发")  // 作用在类上
@RequestMapping("setmeal")
public class SetmealController {

    @Reference
    private SetmealService setmealService;

    @GetMapping("findAllSetmeal.do")
    @ApiOperation(value = "查询所有套餐列表",notes = "移动端套餐列表查询")
    public Result findAllSetmeal(){
        return  new Result(setmealService.list());
    }

    @GetMapping("findSetMealDetail.do")
    @ApiOperation(value = "查询套餐详情",notes = "移动端套餐列表查询")
    public Result findSetMealDetail(@RequestParam("id")String id){
        return new Result(true,"查询ok",setmealService.findSetmealVOPyId(id));
    }

}

